package com.linkgap.cloud.controller;

import com.linkgap.cloud.entity.Student;
import com.linkgap.cloud.service.SchoolService;
import com.linkgap.cloud.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController("/school")
public class SchoolController {

    @Autowired
    private StudentService studentService;


    @Autowired
    private SchoolService schoolService;

    //查询老师赵磊所教的班级，有哪些学生？

    //
    @GetMapping("/queryStudentList/{teacherName}")
    public List<Student> queryStudentList(@PathVariable String teacherName) {
        List<Student> res = schoolService.queryStudentList(teacherName);
        return res;
    }


    //查询赵磊担任班主任的班级中，有哪些同学？


}
